import React, { Component } from 'react';
import Head from './components/Head';
import List from './components/List';
import  './App.css';

class App extends Component {
    state={
        users:[],
        isFirst:true,
        isLoading:false,
        error:null
    }
    changeSearchObj=(searchObj)=>{

       this.setState(searchObj)
    }
   
    render() {
        return (   
            <div className="container">
                <Head changeSearchObj={this.changeSearchObj}/>
                <List {...this.state}/>
            </div>
        );
    }
}

export default App;